import requests
import pytest
import logging

class Test():
    uid=""
    sid=""
    def setup_method(self):
        pass

    def teardown_method(self):
        pass

    def test_log(self):
        url = "http://10.59.9.18/small/user/v1/login"
        data = {"phone":"13811033965","pwd":"123456Aa"}
        r = requests.post(url=url,json=data)
        print(r.json())
        Test.sid=r.json()['result']['sessionId']
        Test.uid=r.json()['result']['userId']
    def test_add(self):
        url="http://10.59.9.18/small/user/verify/v1/addReceiveAddress"
        data={"realName":"aaa","phone":"13811033965","address":"北京 海淀区 八维","zipCode":"101010"}
        tou={"sessionId":str(Test.sid),"userId":str(Test.uid)}
        r=requests.post(url=url,params=data,headers=tou)
        print(r.json())
